package org.helldorado.companybuilder;

import java.util.Map;

public class Spell extends TIPD {
	private static Map<Integer, TIPD> s_spells; 
	
	private static Map<Integer, TIPD> getInstance() {
		if (s_spells == null) {
			String sourceFile = "hd_spells";
			String tag = "spell";
			s_spells = TIPD.getTipdFromFile(sourceFile, tag);
		}
		return s_spells;
	}
	
	public static TIPD getSpellById(Integer id) {
		TIPD ret = getInstance().get(id);
		if (ret == null){
			ret = new TIPD();
			ret.setTitle("Spell not found");
		}
		return ret;
	}
	
}
